home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1995 March / macformat-022.iso / Shareware City / Developers / src / out-of-phase-102-c / OutOfPhase 1.02 Source / OutOfPhase Folder / ASTConditional.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-11-23  |  1.3 KB  |  47 lines  |  [TEXT/KAHL]

  1. /* ASTConditional.h */
  2.  
  3. #ifndef Included_ASTConditional_h
  4. #define Included_ASTConditional_h
  5.  
  6. /* ASTConditional module depends on */
  7. /* MiscInfo.h */
  8. /* Audit */
  9. /* Debug */
  10. /* Definitions */
  11. /* ASTExpression */
  12. /* TrashTracker */
  13. /* Memory */
  14. /* PcodeObject */
  15. /* CompilerRoot */
  16. /* PromotableTypeCheck */
  17.  
  18. #include "PcodeObject.h"
  19. #include "CompilerRoot.h"
  20.  
  21. struct ASTCondRec;
  22. typedef struct ASTCondRec ASTCondRec;
  23.  
  24. /* all memory allocated in the module is done through TrashTracker */
  25.  
  26. /* forwards */
  27. struct TrashTrackRec;
  28. struct ASTExpressionRec;
  29.  
  30. /* create a new if node.  the Alternate can be NIL. */
  31. ASTCondRec*                    NewConditional(struct ASTExpressionRec* Conditional,
  32.                                             struct ASTExpressionRec* Consequent,
  33.                                             struct ASTExpressionRec* Alternate,
  34.                                             struct TrashTrackRec* TrashTracker, long LineNumber);
  35.  
  36. /* type check the conditional node.  this returns eCompileNoError if */
  37. /* everything is ok, and the appropriate type in *ResultingDataType. */
  38. CompileErrors                TypeCheckConditional(DataTypes* ResultingDataType,
  39.                                             ASTCondRec* Conditional, long* ErrorLineNumber,
  40.                                             struct TrashTrackRec* TrashTracker);
  41.  
  42. /* generate code for a conditional.  returns True if successful, or False if it fails. */
  43. MyBoolean                        CodeGenConditional(struct PcodeRec* FuncCode,
  44.                                             long* StackDepthParam, ASTCondRec* Conditional);
  45.  
  46. #endif
  47.